home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: bcc.ac.uk!slidel
- From: slidel@bsm.bioc.ucl.ac.uk (Timothy Slidel)
- Subject: do || die;
- Message-ID: <1996Mar7.052636.59812@ucl.ac.uk>
- Date: Thu, 7 Mar 1996 05:26:36 GMT
- Organization: University College London
- X-Newsreader: TIN [version 1.2 PL2]
-
- Whilst it seems to work ok - is it considered bad style to use
- logical operator expressions as conditional statements on their own, a la
- Perl?
-
- e.g. if I want to decrement i only when it is != 0:
-
- i && i--;
-
- clearly something like:
-
- i && continue;
-
- won't work because continue is a keyword.
-
- I couldn't find anything about this in K&R2 or the C-FAQ and gcc -Wall just
- issues a warning about an unused value...
-
- Thanks.
-
- --
- Tim Slidel, Email: t.slidel@biochem.ucl.ac.uk
- BSM Unit, Biochemistry and Molecular Biology, Tel: +44 171419 3896
- University College, Gower Street, Fax: +44 171380 7193
- London WC1E 6BT, United Kingdom.
-
-